package Day1.examples;

public class MethodiInAMethod {

	public static void main(String[] args) {
		

		/**
		 * HelloWorld class.
		 * 
		 * Naming: Class name  -> first letter of each world (in case of multi word class name, should be upper case letter.
		 * 
		 * @author harinath
		 *
		 */
		class HelloWorld {
			
			private String name;
			
			
			
			
			
			public String getName() {
				return name;
			}
			public void setName(String name) {
				this.name = name;
			}
			
			
			public HelloWorld(){
				System.out.println("I am a constructor with no arguments");
			}
			public HelloWorld(String name){
				this();
				this.name= name;
				
			}
			
			public HelloWorld(String firstName, String lastName){
				this(firstName);
				this.name= firstName;
			
				
				
			}
			
			/**
			 * method name should always start with lower case letter. If it is of multi word, then subsequent words should start with Upper case.
			 */
			public void sayHello(){
				System.out.println("Hello World " + name);
			}
			
			public void sayHello(String name){
				System.out.println("Hello World " + name);
			}
			
			public String sayGoodMorning(String name){
				return "Good morning " + name;
			}
			
			public String sayGoodEvening(String firstName, String lastName){
				
				return  "Good evening " + firstName + "  " + lastName;
			}

	
		}
	}
	
